<?php

namespace app\agent\controller;

use think\facade\Db;

use app\agent\model\UserWithdraw as UserWithdrawModel;

/**
 * 用户提现
 */
class UserWithdraw extends Controller
{
    protected function initialize()
    {
        parent::initialize();
    }

    /**
     * 列表
     */
    public function list()
    {
        $model = new UserWithdrawModel;
        $data = input('post.');
        $data['agent_id'] = $this->agent['id'];
        return $model->getList($data);
    }

    /**
     * 提现审核通过
     */
    public function accept()
    {
        $model = new UserWithdrawModel;
        $data = input('post.');
        $data['agent_id'] = $this->agent['id'];
        return $model->accept($data);
    }

    /**
     * 提现审核不通过
     */
    public function reject()
    {
        $model = new UserWithdrawModel;
        $data = input('post.');
        $data['agent_id'] = $this->agent['id'];
        return $model->reject($data);
    }
}
